package com.lql.lqlreader.androidlearning.service

import com.lql.lqlreader.androidlearning.model.Banner
import com.lql.lqlreader.androidlearning.model.RecommendList
import com.lql.lqlreader.androidlearning.model.SystemTag
import com.lql.lqlreader.androidlearning.model.SystemTagArticleList
import com.lql.lqlreader.service.entity.HttpResultEntity
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
import rx.Observable

interface AndroidLearningService {
    @GET("banner/json")
    fun getBannerList(): Observable<HttpResultEntity<List<Banner>>>

    @GET("article/list/{index}/json")
    fun getRecommendList(@Path("index") index: Int): Observable<HttpResultEntity<RecommendList>>

    @GET("tree/json")
    fun getSystemTagList(): Observable<HttpResultEntity<List<SystemTag>>>

    @GET("article/list/{pageIndex}/json")
    fun getSystemTagArticleList(@Path("pageIndex") pageIndex: Int, @Query("cid") cid: Int): Observable<HttpResultEntity<SystemTagArticleList>>

    @GET("article/listproject/{pageIndex}/json")
    fun getProjectListByRecommend(@Path("pageIndex") pageIndex: Int): Observable<HttpResultEntity<RecommendList>>

    @GET("project/list/{pageIndex}/json")
    fun getProjectListByCategory(@Path("pageIndex") pageIndex: Int, @Query("cid") cid: Int): Observable<HttpResultEntity<RecommendList>>

    @GET("project/tree/json")
    fun getProjectCategory(): Observable<HttpResultEntity<List<SystemTag>>>
}